home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / tcaptur2.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.3 KB  |  43 lines

  1. //    Copyright (c) 1994, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TCapture
  4. //    Include File:    tcapture.h
  5. //    Purpose:    Captures c streams stdout and sterr to a window.
  6. //    Remarks/Portability/Dependencies/Restrictions:
  7. //        Works in conjuction with the c source file capstdio.c and
  8. //        two global variables capstdout and capstderr in globals.c
  9. //    Revision History:
  10. //        01-08-94    created
  11. //        02-09-94    Split all members into seperate files.
  12. #define Uses_otstream
  13. #include"tcapture.h"
  14.  
  15. TCapture::TCapture(TRect TR, const char *cp_title, unsigned short int
  16.     usi_bufsize) :
  17.     TWindowInit(TCapture::initFrame),
  18.     TWindow(TR, cp_title, 0)    {
  19. //    Purpose:    Constructor of the TCapture object.
  20. //    Arguments:    TR        The rectangle to occupy.
  21. //            cp_title    The title of the window.
  22. //            usi_bufsize    The size of the buffer for the dumb
  23. //                    terminal.
  24. //    Remarks/Portability/Dependencies/Restrictions:
  25. //    Revision History:
  26. //        01-08-94    created
  27.  
  28.     //    Set out palette to that of a message window.
  29.     palette = wpCyanWindow;
  30.  
  31.     //    Get the size of the window.
  32.     //    Create the terminal.
  33.     TR = getExtent();
  34.     TR.grow(-1, -1);
  35.  
  36.     TT = new TTerminal(TR, NULL, standardScrollBar(sbVertical |
  37.         sbHandleKeyboard), usi_bufsize);
  38.     insert(TT);
  39.  
  40.     otstream ot(TT);
  41.     DumbStream = ot;
  42. }
  43.